
#pragma once
#include "hzpch.h"
#include "Event.h"
#include "./Window.h"
#include "../ImGui/ImGuiLayer.h"

namespace Hazel
{
    class HAZEL_API Application
    {
    public:
        Application();
        virtual ~Application();
        inline static Application& Get() { return *s_Instance; }
        inline Window& GetWindow() { return *m_Window; }
        void Run();
        void OnEvent(Event &e);

        ImGuiLayer* GetImGuiLayer() { return m_ImGuiLayer; }

    private:
        bool OnWindowClose(WindowCloseEvent &e);
        bool m_Running = true;
        static Application *s_Instance;
         // 添加 ImGui 层指针
        ImGuiLayer* m_ImGuiLayer;
        Scope<Window> m_Window;
    };
    extern Application *CreateApplication();
}
